﻿// <copyright file="ProductKeyTest.cs" company="Snowman Consulting">
//     Copyright (c) 2009 Snowman Consulting. All rights reserved.
// </copyright>

namespace SnowmanConsulting.ProductKeyManager.Test
{
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using SnowmanConsulting.ProductKeyManager.Data;    
    
    /// <summary>
    /// This is a test class for ProductKeyTest and is intended
    /// to contain all ProductKeyTest Unit Tests
    /// </summary>
    [TestClass()]
    public class ProductKeyTest
    {
        /// <summary>
        /// Test context
        /// </summary>
        private TestContext testContextInstance;

        /// <summary>
        /// Gets or sets the test context which provides
        /// information about and functionality for the current test run.
        /// </summary>
        public TestContext TestContext
        {
            get
            {
                return this.testContextInstance;
            }

            set
            {
                this.testContextInstance = value;
            }
        }

        /// <summary>
        /// A test for Notes
        /// </summary>
        [TestMethod()]
        public void NotesTest()
        {
            ProductKey target = new ProductKey();
            string expected = "Some product key notes";
            string actual;
            target.Notes = expected;
            actual = target.Notes;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        /// A test for Code
        /// </summary>
        [TestMethod()]
        public void CodeTest()
        {
            ProductKey target = new ProductKey();
            string expected = "1234-ABCD";
            string actual;
            target.Code = expected;
            actual = target.Code;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        /// A test for AllocatedTo
        /// </summary>
        [TestMethod()]
        public void AllocatedToTest()
        {
            ProductKey target = new ProductKey();
            string expected = "Allocated to value";
            string actual;
            target.AllocatedTo = expected;
            actual = target.AllocatedTo;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        /// A test for ProductKey Constructor
        /// </summary>
        [TestMethod()]
        public void ProductKeyConstructorTest()
        {
            ProductKey target = new ProductKey();
            Assert.IsNotNull(target);
        }
    }
}
